﻿Imports System Imports System.Collections.Generic Imports System.Text

Public Class CSanPham
#Region "Thuộc tính Sản phẩm"

    Private _maSP As String
    Private _tenSP As String
    Private _tenPhienBan As String
    Private _maLoaiSP As Integer
    Private _hinhSP As String
    Private _ngayNhap As Date
    Private _giaNhap As String
    Private _giaBan As String
    Private _soLuong As Integer
    Private _maNVNhap As String
    Private _maNCC As Integer
    Private _moTa As String
    Private _ghiChu As String

    Public Property maSP() As String
        Get
            Return _maSP
        End Get
        Set(ByVal value As String)
            _maSP = value
        End Set
    End Property

    Public Property tenSP() As String
        Get
            Return _tenSP
        End Get
        Set(ByVal value As String)
            _tenSP = value
        End Set
    End Property

    Public Property tenPhienBan() As String
        Get
            Return _tenPhienBan
        End Get
        Set(ByVal value As String)
            _tenPhienBan = value
        End Set
    End Property

    Public Property maLoaiSP() As Integer
        Get
            Return _maLoaiSP
        End Get
        Set(ByVal value As Integer)
            _maLoaiSP = value
        End Set
    End Property

    Public Property hinhSP() As String
        Get
            Return _hinhSP
        End Get
        Set(ByVal value As String)
            _hinhSP = value
        End Set
    End Property

    Public Property ngayNhap() As Date
        Get
            Return _ngayNhap
        End Get
        Set(ByVal value As Date)
            _ngayNhap = value
        End Set
    End Property

    Public Property giaNhap() As Double
        Get
            Return _giaNhap
        End Get
        Set(ByVal value As Double)
            _giaNhap = value
        End Set
    End Property

    Public Property giaBan() As Double
        Get
            Return _giaBan
        End Get
        Set(ByVal value As Double)
            _giaBan = value
        End Set
    End Property

    Public Property soluong() As Integer
        Get
            Return _soLuong
        End Get
        Set(ByVal value As Integer)
            _soLuong = value
        End Set
    End Property

    Public Property maNVNhap() As String
        Get
            Return _maNVNhap
        End Get
        Set(ByVal value As String)
            _maNVNhap = value
        End Set
    End Property

    Public Property maNCC() As Integer
        Get
            Return _maNCC
        End Get
        Set(ByVal value As Integer)
            _maNCC = value
        End Set
    End Property

    Public Property moTa() As String
        Get
            Return _moTa
        End Get
        Set(ByVal value As String)
            _moTa = value
        End Set
    End Property

    Public Property ghiChu() As String
        Get
            Return _ghiChu
        End Get
        Set(ByVal value As String)
            _ghiChu = value
        End Set
    End Property
#End Region
#Region "Phương thuc khởi tạo"
    Public Sub New()
        Me.maSP = ""
        Me.tenSP = ""
        Me.tenPhienBan = ""
        Me.maLoaiSP = 0
        Me.hinhSP = ""
        Me.ngayNhap = ngayNhap.Date
        Me.giaNhap = ""
        Me.giaBan = ""
        Me.soluong = 0
        Me.maNVNhap = ""
        Me.maNCC = ""
        Me.moTa = ""
        Me.ghiChu = ""
    End Sub
    Public Sub New(ByVal SanPham As CSanPham)
        Me.maSP = SanPham.maSP
        Me.tenSP = SanPham.tenSP
        Me.tenPhienBan = SanPham.tenPhienBan
        Me.maLoaiSP = SanPham.maLoaiSP
        Me.hinhSP = SanPham.hinhSP
        Me.ngayNhap = SanPham.ngayNhap
        Me.giaNhap = SanPham.giaNhap
        Me.giaBan = SanPham.giaBan
        Me.soluong = SanPham.soluong
        Me.maNVNhap = SanPham.maNVNhap
        Me.maNCC = SanPham.maNCC
        Me.moTa = SanPham.moTa
        Me.ghiChu = SanPham.ghiChu
    End Sub
    Public Sub New(ByVal ma_SP As String, ByVal ten_SP As String, ByVal ten_PhienBan As String, ByVal ma_LoaiSP As Integer, ByVal hinh_SP As String, ByVal ngay_Nhap As Date, ByVal gia_Nhap As String, ByVal gia_Ban As String, ByVal so_Luong As Integer, ByVal ma_NVNhap As String, ByVal ma_NCC As Integer, ByVal mo_Ta As String, ByVal ghi_Chu As String)
        Me.maSP = ma_SP
        Me.tenSP = ten_SP
        Me.tenPhienBan = ten_PhienBan
        Me.maLoaiSP = ma_LoaiSP
        Me.hinhSP = hinh_SP
        Me.ngayNhap = ngay_Nhap
        Me.giaNhap = gia_Nhap
        Me.giaBan = gia_Ban
        Me.soluong = so_Luong
        Me.maNVNhap = maNVNhap
        Me.maNCC = ma_NCC
        Me.moTa = mo_Ta
        Me.ghiChu = ghi_Chu
    End Sub
#End Region
End Class